<%= page_title '포토앨범' %>

<div id="summary_area">
	<div class="count float left">
	총 <%= @albums_count %>개의 앨범
	</div>
	<div class="float right">
		<%= button_link_to '새 앨범 만들기', new_album_path if logged_in? %>
	</div>
	<div class="clear"></div>
</div>

<ul id="album_list">
<% for album in @albums %>
  <li>
    <div class="photo thumb float left">
			<%= link_to photo_thumbnail(album.photos.first), album_path(album) %>
		</div>
		<div class="summary">
			<ul>
				<li class="title">제목: <%= link_to truncate(h(album.title), 45), album_path(album) %></li>
				<li class="count">총 <%= album.photos.size %>개의 사진</li>
				<li class="by">만든이: <%= link_to album.user, user_path(album.user) %></li>
				<li class="at">만든 날짜: <%= human_time(album.updated_at) %></li>
			</ul>
		</div>
		<div class="clear"></div>
  </li>
<% end %>
</ul>

<div id="pagination">
	<%= will_paginate @albums %>
</div>	
